/* 功能：打印EOF的值 */

#include <stdio.h>

/* 打印一个EOF值的程序 */
int main(){

	int c,eof,num;
	c = EOF;num = 0;
	printf("%d\n",EOF);
	printf("------------------------------------\n");
	while(1){
		if ((eof = ((c =getchar()) != EOF))){ 	/* 字记数程序，以下是个人发挥 */
			if (c == '\n'){
				num = 0;
				printf("\n");
			}else{
				printf("%d ",++num);
			}
		}
		else{
			printf("%d",eof);
			break;
		}
	}

}
